import time
import random

def linearSearch(A, v):
    for j in range(0,len(A)):
        if v == A[j]:
            return j
        pass
    return -1
    


A = [5, 2, 4, 6, 1, 3]
v = 1
print linearSearch(A,v)

# Linear-Search(A,v)
# 1 for j <- 1 to length[A]
# 2     if v == A[j]
# 3          return j
# 4     return NIL

